package HomeWork;
/*
请把一个整型数组,例如存了数据:11,22,33,拷贝成一个一模一样的数字组出来.
 */
public class Test5 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6};
        int[] newArr = getCopy(arr);
        for (int i = 0; i < newArr.length; i++) {
            System.out.println(newArr[i]);
        }
    }

    public static int[] getCopy(int[] arr){
        int[] newArr = new int[arr.length];
        for (int i = 0; i < arr.length; i++) {
            newArr[i] = arr[i];
        }
        return newArr;
    }
}
